// 用户相关类型
export interface User {
  id: string;
  username: string;
  phone?: string;
}

// 设备相关类型
export interface Device {
  deviceId: string;
  deviceName: string;
  deviceType?: string;
  online: boolean;
  lastHeartbeat?: string;
  userId?: string; // 设备所属用户ID
}

// 设备注册响应类型
export interface DeviceRegisterResponse {
  deviceId: string;
  deviceName: string;
}

// 认证响应类型
export interface AuthResponse {
  success: boolean;
  data: {
    userId: string;
    userName: string;
    token: string;
  };
  status: {
    code: string;
    message: string;
  };
}

// 语音记录类型
export interface VoiceRecord {
  id: string;
  userId: string;
  deviceId: string;
  text: string;
  confidence: number;
  audioUrl?: string;
  createdAt: string;
}

// 文字同步数据类型
export interface TextSyncData {
  sourceUserId: string;
  sourceDeviceId: string;
  targetDeviceId: string;
  content: string;
  timestamp: string;
}

// WebSocket消息类型
export interface WebSocketMessage {
  type: string;
  data: any;
}

// 应用状态类型
export interface AppState {
  user: User | null;
  token: string | null;
  currentDeviceId: string | null;
  isConnected: boolean;
  isLoading: boolean;
} 